package cn.liujianbo.example.base;

/**
 * @author 刘建波
 * @date 2022-04-16 16:26
 */
//使用enum关键字枚举类
interface Info {
    void show();
}

//使用enum关键字枚举类
enum Season1 implements Info {
    //1.提供当前枚举类的对象，多个对象之间用","隔开，末尾对象";"结束
    SPRING("春天", "春暖花开") {
        @Override
        public void show() {
            System.out.println("暖春");
        }
    },
    SUMMER("夏天", "夏日炎炎") {
        @Override
        public void show() {
            System.out.println("宁夏");
        }
    },
    AUTUMN("秋天", "秋高气爽") {
        @Override
        public void show() {
            System.out.println("秋天不回来");
        }
    },
    WINTER("冬天", "冰天雪地") {
        @Override
        public void show() {
            System.out.println("大约在冬季");
        }
    };



    private final String name;
    private final String desc;

    Season1(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    @Override
    public void show() {
        System.out.println("default");
    }
}
